// ImageCanvas.h: interface for the ImageCanvas class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMAGECANVAS_H__EC77690F_8546_11D2_A42D_006097A44215__INCLUDED_)
#define AFX_IMAGECANVAS_H__EC77690F_8546_11D2_A42D_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "Image.h"

class CLASS_DECL_D ImageCanvas : public AWTCanvas  
{
DECLARE_DYNAMIC(ImageCanvas)
public:
	ImageCanvas();
	ImageCanvas(Image* image);
	virtual ~ImageCanvas();

	void setImage(Image* image);
	void setOffset(CPoint pt)
		{m_offset = pt;}

	virtual void paint(CDC* pDC);
	virtual CSize getPreferredSize();
	virtual CSize getMinimumSize()
		{return getPreferredSize();}
	virtual void eraseBackground(CDC* pDC){};

protected:
	Image* m_image;
	CPoint m_offset;
};

#endif // !defined(AFX_IMAGECANVAS_H__EC77690F_8546_11D2_A42D_006097A44215__INCLUDED_)
